<template>
     <div v-show="noShow">
       <div class="masker">
           <div class="add-modal">
              <div class="title"> 
                <span class="title-l">请确认是否删除该条信息成员信息</span>
                <span class="title-f" @click="delCancel">x</span>
              </div>
              <div class="delBtnAll">
                  <button @click="delSave">确定</button>
                  <button @click="delClose">取消</button>
              </div>
           </div>
       </div>
    </div>
</template>
<script>
import axios from 'axios'
export default {
    props:['delId','getData'],
    data(){
        return {
              noShow:false
        }
    },
    methods:{
        delCancel(){
            this.$emit('modalHides',this.noShow)
        },
        delClose(){
             this.$emit('modalHides',this.noShow)
        },
        delSave(){
            axios.delete('http://localhost/api.php/jqsystems/'+this.delId)
            .then( res=>{
                if(res){
                    this.getData()
                     this.$emit('modalHides',this.noShow)
                }
            })
            .catch( err=>{

            })
        }
    }
}
</script>
<style scoped>
 .masker{
        position:fixed;
        top: 0;
        left: 0;
        bottom:0;
        right: 0;
        background: rgba(0, 0, 0, 0.5)
    }
    .add-modal{
        width: 600px;
        background: #fff;
        margin: 50px auto 0;
        height: 160px;
    }
    .delBtnAll{
        float: right;
        margin: 60px;
    }
</style>


